home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
T-COMAL Today
/
(k)td.d64
/
src.oki92
< prev
next >
Wrap
Text File
|
2007-02-28
|
3KB
|
192 lines
; PUT "@0:DUMP.SRC"
;
.LIB C64SYMB
.OPT LIST
;
*=$8009
;
.BYT DEFPAG
.WOR END
.WOR SENSE
;
.BYT 9,'OKIDATA92'
.WOR PTABLE
.WOR INIT
.BYT 0
;
SENSE RTS
;
INIT RTS
;
PTABLE .BYT 17,'OKI92_SCREEN_DUMP'
.WOR DESCR
.BYT 0
;
DESCR .BYT PROC
.WOR SCRDMP
.BYT 1
.BYT VALUE+INT
.BYT ENDPRC
;
PRROWS =28
PRBITS =7
COLS =40
N1 =FREKZP
N2 =FREKZP+1
COL =FREKZP+2
ROW =FREKZP+3
GRAFON =3
GRAFLF =14
NOGRAF =2
BITSCR =$E000
;
SCRDMP LDA #1 ; GET FILE NUMBER
JSR FNDPAR
LDY #1
LDA (COPY1),Y
TAX
JSR CCKOUT
LDA #GRAFON
JSR CWRT
LDA #PRROWS
STA ROW
LDA #PRBITS
STA N2
LDA #<BITSCR
STA P1+1
STA P2+1
LDA #>BITSCR
STA P1+2
STA P2+2
;
; THE FOLLOWING INSTRUCTIONS FORM THE MAIN LOOP
;
NXTROW JSR STOP ; CHECK FOR STOP KEY
BEQ FINISH
;
LDA #PRBITS
SEC
SBC N2
JSR DOROW
JSR LINEFD
DEC N2
BPL STPROW
LDA #PRBITS
STA N2
STPROW LDX ROW
DEX
STX ROW
BNE NXTROW
LDA #0 ; DO LAST ROW WHICH IS
STA N2 ; ONLY 4 BITS HIGH
LDA #4
JSR DOROW
FINISH LDA #GRAFON
JSR CWRT
LDA #NOGRAF
JSR CWRT
RTS
;
; END OF THE MAIN LOOP
;
;
;
DOROW STA N1
LDA #COLS
STA COL
NXTCOL JSR DOCOL
DEC COL
BNE NXTCOL
RTS
;
;
DOCOL LDA D1CRA ; STOP THE TIMER
AND #$FE
STA D1CRA
LDA R6510 ; SWITCH OUT KERNAL ROM
AND #$FD
STA R6510
LDX N1
XFER1 DEX
BMI XFER20
P1 LDA $E000,X
STA AC1,X
JMP XFER1
;
XFER20 LDX N2
XFER2 DEX
BMI XFORM
P2 LDA $E000,X
STA AC2,X
JMP XFER2
;
XFORM LDA R6510 ; SWITCH BACK KERNAL ROM
ORA #2
STA R6510
LDA D1CRA ; RESTART TIMER
ORA #1
STA D1CRA
;
LDY #PRBITS+1 ; FORM OUTPUT BYTE
GROUP1 LDX #0
NXTLN1 CPX N1
BEQ GROUP2
ASL AC1,X
ROR A
INX
JMP NXTLN1
;
GROUP2 LDX #0
NXTLN2 CPX N2
BEQ BYTEND
ASL AC2,X
ROR A
INX
JMP NXTLN2
;
BYTEND LSR A
LDX ROW
BNE NOTLST
LSR A ; ZERO REMAINING BITS
LSR A ; IN THE LAST ROW
LSR A
NOTLST CMP #GRAFON
BNE NOT3
JSR CWRT ; IF A 3, MUST SEND
LDA #GRAFON ; TWO OF THEM
NOT3 JSR CWRT
DEY
BNE GROUP1
LDA COL
CMP #1
BEQ P1INC7
LDA N1
BNE P1INC8
BEQ DOP2
P1INC7 LDA #PRBITS
BNE ADDP1
P1INC8 LDA #PRBITS+1
ADDP1 CLC
ADC P1+1
STA P1+1
BCC DOP2
INC P1+2
DOP2 LDA N2
BEQ ENDCOL
LDA #PRBITS+1
CLC
ADC P2+1
STA P2+1
BCC ENDCOL
INC P2+2
ENDCOL RTS
;
;
LINEFD LDA #GRAFON
JSR CWRT
LDA #GRAFLF
JSR CWRT
RTS
;
END .END